In the field of query processing, tables can often be stored on multiple databases, as illustrated in FIG. 1. To process a query, tables are typically copied from each database, and any data manipulations or comparisons are then performed in a local memory space. In the example illustrated in FIG. 1, Table A is located in one foreign database and Table B is located in another foreign database. In order to join Tables A and B together on columns X and Y respectively, the following SQL join expression may be submitted to the SQL processor, “select * from A inner join B on A.X.=B.Y”. In this example, both Tables A and B would typically be copied to the SQL processor to perform the join, with the comparison of columns X and Y being performed locally, as illustrated in FIG. 1. This operation may often be very resource and time intensive.